package com.lzh.service;

import com.lzh.spring.BeanPostProcessor;
import com.lzh.spring.Component;

@Component
public class LzhBeanPostProcessor implements BeanPostProcessor {
    @Override
    public void postProcessBeforeInitialization(String BeanName, Object bean) {
        //可批量处理bean
        if (BeanName.equals("userService")){
            System.out.println(111);
        }
    }

    @Override
    public void postProcessAfterInitialization(String BeanName, Object bean) {
        //可批量处理bean
        if (BeanName.equals("userService")){
            System.out.println(222);
        }
    }
}
